$(function(){
	goToPage(1);
});


function goToPage(pageNo){
	var operationname = $('#operationname').val();
	var content = $("#details").val();
//	alert(content);
	var beginTime = $('#beginTime').val();
	var endTime = $('#endTime').val();
	var userName = $('#userName').val();
	$.ajax({
		url : contextPath+ 'admin/sms/list',
		data : {
			operationname : operationname,
			begintime:beginTime,
			endtime:endTime,
			operatorname:userName,
			content : content,
			pageno:pageNo,
			pagesize : 10
		},
		type : 'POST',
		success : function(list) {
			$("#content").empty();
			$(".page").empty();
			if(list!=null && list.totalRecord>0){
				var log = list.records;
				for(var i=0;i<log.length;i++){
					var div = '<div class="pwsj_right_czrz_cont">';
					div += '<ul class="czrz_cont_ul">';
					div += '<li class="number" style="width: 10%">'+(10*(pageNo-1)+i+1)+'</li>';
					div += '<li class="time" style="width: 25%">'+log[i].createTimeStr+'</li>';
					div += '<li class="operation" style="width: 40%">'+log[i].content+'</li>';
					div += '<li class="username" style="width: 24%;border-right:none;">'+log[i].operator.loginName+'</li>';
					div += '</ul>';
					div += '</div>';
					$("#content").append(div);
				}
				pageList(list);
			}
		}
	});
}